import {ModalFormProps} from "@ant-design/pro-form/lib/layouts/ModalForm";
import CModalForm from "@/components/CModalForm";
import {CModalFormProps} from "@/components/CModalForm/type";
import fields from "@/pages/news/list/components/AddSysNews/config/fields";
import {SelectProps} from "antd";


export default (props: {newsCategoryList: SelectProps["options"],
  newsTagList: SelectProps["options"]} & ModalFormProps ) => {
    // @ts-ignore
    const modalFormProps: CModalFormProps<any> = {
        ...props,
        groupList: fields(props.newsCategoryList, props.newsTagList),
    }
    return (
        <CModalForm{...modalFormProps}/>
    )
}
